{% extends 'forum/index.html' %}
{% block l_content %}

    <style>
        .zone-sc {
            font-size: 2rem;
            border-right: 1px black solid;
            width: 30%;
            text-align: center
        }

        .hr {
            width: 100%;
            border: 1px grey solid;
            margin: 5px 0;
        }
    </style>

    <div class="f_one">
        <div id="search">
            <form class="form-horizontal" role="form" action="/forum/zone/?tag=0" method="get">
                <div style="position: absolute;right: 15px;z-index: 1">
                    <button type="submit" class="btn btn-primary">搜索</button>
                </div>
                <div class="col-sm-12">
                    {% if text %}
                            <input type="text" name="text" class="form-control" id="firstname" placeholder="输入搜索内容" value="{{ text }}">
                            {% else %}
                            <input type="text" name="text" class="form-control" id="firstname" placeholder="输入搜索内容">
                            {% endif %}
                </div>
            </form>
            <div class="col-sm-12">
                <p style="font-size: 2rem;margin-top: 5%;color: dodgerblue">分类列表</p>
                <a href="/forum/zone/?tag=-1&text={{ text }}">
                    <p class="fenlei"><span class="label label-info">点赞最多</span></p></a>
                <a href="/forum/zone/?tag=0&text={{ text }}">
                    <p class="fenlei"><span class="label label-info">全部</span></p></a>
                {% for o in tags %}
                    {% if o.id == tag %}
                        <a href="/forum/zone/?tag={{ o.id }}&text={{ text }}">
                            <p class="fenlei"><span class="label label-success">{{ o.type }}</span></p></a>
                    {% else %}
                        <a href="/forum/zone/?tag={{ o.id }}&text={{ text }}">
                            <p class="fenlei"><span class="label label-default">{{ o.type }}</span></p></a>
                    {% endif %}
                {% endfor %}

            </div>
        </div>
        <p class="zone-sc">我的收藏</p>
        <p class="hr"></p>
        {% if data %}
            {% for o in data %}
                <div class="f_one">
                    <div>
                        <a href="/forum/article_deatil/?id={{ o.id }}&type=2" class="black"><p class="bt">{{ o.title }}</p></a>
                        <p class="auther">
                            <span>{{ o.auther }}({{ o.depart }})</span><span
                                class="margin_left">{{ o.time }}</span><span class="margin_left">{{ o.tag }}</span>
                        </p>
                        <a href="/forum/article_deatil/?id={{ o.id }}&type=2" class="black"><p class="theme">

                            {{ o.content|safe }}
                        </p></a>
                        <p class="wei">
                            {% if is_coll %}
                                <span class="pl allready" disabled="true" style="background-color: orange">已收藏</span>
                            {% else %}
                                <span class="pl" style="background-color: orange">收藏{{ o.coll }}</span>
                            {% endif %}
                            <a href="/forum/article_deatil/?id={{ o.id }}&type=2">
                            <span class="margin_left pl">讨论{{ o.pl_num }}</span></a>
                            {% if is_praise %}
                                <span class="margin_left zan allready" disabled="true">已赞{{ o.praise }}</span>
                            {% else %}
                                <span class="margin_left zan">点赞{{ o.praise }}</span>
                            {% endif %}
                            <span class="margin_left pl">转发</span>
                        </p>
                    </div>
                    {% if o.dp %}
                        <div class="nice-pinglun">
                            <p>
                                <span style="color: orangered">经典评论</span><span style="color: blue"
                                                                                class="pl">{{ o.dp.user }}({{ o.dp.depart }})</span>:
                                <span style="color: grey;opacity: 0.5">下面是点赞最多的评论哦</span>
                                <br>
                                <span>{{ o.dp.content }}</span><span class="zan margin_left">赞{{ o.dp.praise }}</span>
                            </p>
                        </div>
                    {% endif %}
                </div>
            {% endfor %}
        {% else %}
            <a href="#" class="black"><p class="bt">你还没有任何收藏哦，去广场逛逛吧</p></a>
        {% endif %}
    </div>
    <script>
        $('.l_li').removeClass('active');
        $('#5').addClass('active');
    </script>
{% endblock %}